package CutLoad.web.slide
{
	import CutLoad.Base;
	import CutLoad.components.CButton;
	import CutLoad.cookies.Painter;
	
	import flash.display.DisplayObject;
	import flash.display.Sprite;
	
	/**
	 * 圆形按钮
	 * @author smallerbird mail:smallerbird@gmail.com  site:www.mkigm.com QQ群:49983196
	 * 下午02:21:08 
	 *
	 */
	public class CSlideBtn extends CButton
	{
		public function CSlideBtn()
		{
			super();
			super.init();
			var arrSkin:Array=[getBtnState_up(),getBtnState_over(),getBtnState_down(),getBtnState_disabled()];
			super.setDisplayObjState(arrSkin);
		}
		/**
		 * 按钮up状态 
		 * @return 
		 * 
		 */		
		protected function getBtnState_up():DisplayObject{
			var sp:Sprite=new Sprite();
			var base:Base=Painter.drawCircle(5,0xcccccc,.8)
			base.x=base.width/2;
			base.y=base.height/2;
			base.show(sp)
			return sp
		}
		/**
		 * 按钮over状态 
		 * @return 
		 * 
		 */		
		protected function getBtnState_over():DisplayObject{
			var sp:Sprite=new Sprite();
			var base:Base=Painter.drawCircle(5,0xff3300,.8)
			base.x=base.width/2;
			base.y=base.height/2;
			base.show(sp)
			return sp
		}
		/**
		 * 按钮down状态 
		 * @return 
		 * 
		 */		
		protected function getBtnState_down():DisplayObject{
			return getBtnState_over();
		}
		/**
		 * 按钮disabled状态 
		 * @return 
		 * 
		 */		
		protected function getBtnState_disabled():DisplayObject{
			return getBtnState_over();
		}
		override public function getShowWidth():Number{
			return this.width;
		}
		override public function getShowHeight():Number{
			return this.height;
		}
	}
}